﻿//------------------------------------------------------------
// Game Framework
// Copyright © 2013-2021 Jiang Yin. All rights reserved.
// Homepage: https://gameframework.cn/
// Feedback: mailto:ellan@gameframework.cn
//------------------------------------------------------------

using UGFExtensions.SpriteCollection;
using UGFExtensions.Timer;
using UnityEngine;

namespace Adventure
{
    /// <summary>
    /// 游戏入口。
    /// </summary>
    public partial class GameEntry : MonoBehaviour
    {
        public static BuiltinDataComponent BuiltinData
        {
            get;
            private set;
        }

        public static ArchiveComponent ArchiveData
        {
            get;
            private set;
        }   

        public static TimerComponent TimerComponent
        {
            get;
            private set;
        }
        public static SpriteCollectionComponent SpriteCollectionComponent
        {
            get;
            private set;
        } 
        public static InputComponent InputComponent
        {
            get;
            private set;
        }

        public static HPBarlComponent HPBarlComponent
        {
            get;
            private set;
        }

        private static void InitCustomComponents()
        {
            BuiltinData = UnityGameFramework.Runtime.GameEntry.GetComponent<BuiltinDataComponent>();
            ArchiveData = UnityGameFramework.Runtime.GameEntry.GetComponent<ArchiveComponent>();
            TimerComponent = UnityGameFramework.Runtime.GameEntry.GetComponent<TimerComponent>();
            SpriteCollectionComponent = UnityGameFramework.Runtime.GameEntry.GetComponent<SpriteCollectionComponent>();
            InputComponent = UnityGameFramework.Runtime.GameEntry.GetComponent<InputComponent>();
            HPBarlComponent = UnityGameFramework.Runtime.GameEntry.GetComponent<HPBarlComponent>();

        }
    }
}
